import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:namewava/pages/launch/widgets/jc_agree_text.dart';
import 'package:namewava/utils/jc_image_path.dart';
import 'package:namewava/utils/jc_screenutil_info.dart';
import 'package:namewava/utils/jc_text_style.dart';

class JcLoginPop extends StatelessWidget {
  const JcLoginPop({super.key, required this.backEvents});
  final Function backEvents;

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      child: Container(
        height: JcScreenutilInfo.screenHeight,
        width: JcScreenutilInfo.screenWidth,
        color: Colors.transparent,
        child: Column(
          mainAxisSize: MainAxisSize.min,
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            GestureDetector(
              child: Container(
                // margin: EdgeInsets.only(left: 30.w, right: 30.w),
                width: JcScreenutilInfo.screenWidth - 60.w,
                padding: EdgeInsets.only(
                    left: 25.w, right: 25.w, bottom: 24.h, top: 10.h),
                decoration: const BoxDecoration(
                    image: DecorationImage(
                        image: AssetImage(JcImagePath.jcWavaLogoPopBg),
                        fit: BoxFit.fill)),
                child: Column(
                  children: [
                    Image.asset(
                      JcImagePath.jcWavaLogo,
                      width: 100.w,
                      height: 100.w,
                    ),
                    Text(
                      'CardForge',
                      style: JcTextStyle.poetsenOneRegularTextStyle(
                          25, Colors.black),
                    ),
                    SizedBox(
                      height: 16.h,
                    ),
                    const JcAgreeText(),
                    SizedBox(
                      height: 24.h,
                    ),
                    GestureDetector(
                      child: Container(
                        margin: EdgeInsets.only(left: 30.w, right: 30.w),
                        height: 40.h,
                        alignment: Alignment.center,
                        decoration: BoxDecoration(
                            color: const Color(0xFF1445CD),
                            borderRadius: BorderRadius.circular(20.h)),
                        child: Text(
                          'Agree and Continue',
                          style: JcTextStyle.octoberDevanagariMediumTextStyle(
                              14, Colors.white),
                        ),
                      ),
                      onTap: () {
                        backEvents();
                        Get.back();
                      },
                    ),
                    SizedBox(
                      height: 20.h,
                    ),
                    GestureDetector(
                      child: Container(
                        margin: EdgeInsets.only(left: 30.w, right: 30.w),
                        height: 40.h,
                        alignment: Alignment.center,
                        decoration: BoxDecoration(
                            color: const Color.fromRGBO(255, 255, 255, 0.3),
                            borderRadius: BorderRadius.circular(20.h)),
                        child: Text(
                          'Cancel',
                          style: JcTextStyle.octoberDevanagariMediumTextStyle(
                              14, Colors.white),
                        ),
                      ),
                      onTap: () {
                        Get.back();
                      },
                    )
                  ],
                ),
              ),
              onTap: () {},
            )
          ],
        ),
      ),
      onTap: () {
        Get.back();
      },
    );
  }
}
